/* XY28预测网站样式优化 */

/* 基础样式 */
body {
    font-family: 'Microsoft YaHei', '微软雅黑', Arial, sans-serif;
    background-color: #f8f9fa;
    line-height: 1.6;
    color: #333;
}

/* 网站头部样式优化 */
.site-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 30px 0;
    margin-bottom: 30px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    text-align: center;
    color: white;
}

.site-title {
    font-size: 32px;
    font-weight: 700;
    margin: 0 0 15px 0;
    text-shadow: 0 2px 8px rgba(0,0,0,0.3);
    line-height: 1.3;
    letter-spacing: 0.5px;
}

.site-description {
    font-size: 16px;
    margin: 0;
    opacity: 0.9;
    font-weight: 400;
    text-shadow: 0 1px 4px rgba(0,0,0,0.2);
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.5;
}

._head {
	padding-top: 0;
	text-align: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 20px 0;
    margin-bottom: 30px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

._head img {
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    transition: transform 0.3s ease;
}

._head img:hover {
    transform: translateY(-2px);
}

._head span {
    display: inline-block;
    line-height: 36px;
    font-weight: normal;
	font-size: 30px;
	padding-top: 20px;
	padding-bottom: 10px;
}

._head p {
    font-size: 13px;
    color: #555;
}

._nav {
	text-align: center;
}

._search {
	white-space: normal;
	text-align: center;
	max-width: 420px;
	padding-left: 10px;
}

.row {
	vertical-align: middle;
	width: 88%;
	display: block;
}

th {
	text-align: center;
}

/* 标签样式 */
.label-badge {
	padding: 7px;
	border-radius: 25%;
}

.radius1 {
	border-radius: 2%;
}

.label-danger {
    background-color: #E34040;
    color: white;
    font-weight: bold;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
}

.label-primary {
    background-color: #0094E0;
    color: white;
    font-weight: bold;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
}

/* 表格样式 */
table {
	font-size: 15px;
    border-collapse: separate;
    border-spacing: 0;
}

.nav li {
	padding-top: 2px;
	padding-left: 1px;
	padding-right: 1px;
}

/* 球体样式 */
.myui-ball {
    display: inline-block;
    width: 20px;
    height: 40px;
    line-height: 40px;
    font-size: 11px;
    color: rgb(255, 255, 255);
    border-radius: 5px;
}

.myui-balls {
    display: inline-block;
    width: 20px;
    height: 40px;
    line-height: 20px;
    font-size: 11px;
    color: rgb(255, 255, 255);
    border-radius: 5px;
}

/* 颜色定义 */
.cyanBlue { background-color: rgb(19, 181, 177); }
.skyBlue { background-color: rgb(85, 111, 181); }
.cyanred { background-color: rgb(255, 0, 0); }
.sblue { background-color: rgb(56, 34, 64); }
.green { background-color: rgb(46, 117, 59); }

/* 导航菜单优化 - PC端专用 */
.main-nav {
    margin-bottom: 30px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    padding: 15px 0;
}

.nav-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.nav-primary {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    padding-bottom: 10px;
    text-align: center;
    gap: 5px;
}

.nav-primary li {
    width: auto;
    min-width: 120px;
    list-style: none;
    flex: 1;
    max-width: 200px;
}

.nav-primary a {
    padding: 15px 12px;
    display: block;
    min-height: 50px;
    text-decoration: none;
    color: #333;
    transition: all 0.3s ease;
    border-radius: 6px;
    font-weight: 500;
    font-size: 14px;
}

.nav-primary a:hover {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.nav-primary .active a {
    background: linear-gradient(135deg, #3280fc 0%, #145ccd 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(50, 128, 252, 0.4);
}

/* 预测类型导航样式 */
.prediction-types-nav {
    margin-bottom: 20px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    padding: 15px 0;
}

.prediction-types {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 3px;
}

.prediction-types li {
    width: auto;
    min-width: 80px;
    list-style: none;
    flex: 1;
    max-width: 120px;
}

.prediction-types a {
    padding: 12px 8px;
    display: block;
    min-height: 45px;
    text-decoration: none;
    color: #333;
    transition: all 0.3s ease;
    border-radius: 6px;
    font-weight: 500;
    font-size: 13px;
    text-align: center;
    line-height: 1.3;
}

.prediction-types a:hover {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.prediction-types .active a {
    background: linear-gradient(135deg, #3280fc 0%, #145ccd 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(50, 128, 252, 0.4);
}

/* 算法导航专用样式 */
.algorithm-selection-nav {
    margin-bottom: 20px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    padding: 15px 0;
}

.algorithm-nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 5px;
}

.algorithm-nav li {
    min-width: 120px;
    list-style: none;
    flex: 1;
    max-width: 150px;
}

.algorithm-nav a {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    padding: 12px 10px;
    display: block;
    min-height: 45px;
    text-decoration: none;
    color: #333;
    transition: all 0.3s ease;
    border-radius: 6px;
    font-weight: 500;
    font-size: 13px;
    text-align: center;
    line-height: 1.3;
}

.algorithm-nav a:hover {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-color: transparent;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.algorithm-nav .active a {
    background: linear-gradient(135deg, #3280fc 0%, #145ccd 100%);
    color: white;
    border-color: transparent;
    box-shadow: 0 4px 15px rgba(50, 128, 252, 0.4);
}

/* 表格响应式容器 - PC端优化 */
.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 30px 0;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 15px rgba(0,0,0,0.1);
    padding: 20px;
}

.table-responsive table {
    min-width: 800px;
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

/* 表格美化 */
.table-striped tbody tr:nth-of-type(odd) {
    background-color: #f8f9fa;
}

.table-hover tbody tr:hover {
    background-color: #e3f2fd;
    transition: background-color 0.3s ease;
}

.table th {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-weight: 600;
    padding: 15px 10px;
    border: none;
    font-size: 14px;
    text-align: center;
}

.table td {
    padding: 12px 10px;
    border-bottom: 1px solid #e9ecef;
    text-align: center;
    font-size: 13px;
}

.table td:first-child {
    font-weight: 600;
    color: #667eea;
}

.table td[data-label="开奖结果"] {
    font-family: 'Courier New', monospace;
    font-weight: bold;
}

/* 预测结果标签美化 */
.table .label {
    margin: 2px;
    display: inline-block;
    min-width: 40px;
    text-align: center;
}

/* 面板样式优化 */
.panel {
    margin: 20px auto;
    max-width: 800px;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.panel-heading {
    background-color: #f5f5f5;
    padding: 10px 15px;
    border-bottom: 1px solid #ddd;
    font-weight: bold;
}

.panel-body {
    padding: 15px;
}

.panel-body a {
    margin: 0 5px;
    color: #145ccd;
    text-decoration: none;
}

.panel-body a:hover {
    text-decoration: underline;
}

/* PC端专用样式 */

/* 内容容器 */
.content-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 预测区域 */
.prediction-section {
    margin: 40px 0;
}

.section-title {
    text-align: center;
    margin: 30px 0;
    font-size: 24px;
    color: #333;
    font-weight: 600;
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    margin: 10px auto;
    border-radius: 2px;
}

/* 预测表格 */
.prediction-table {
    font-size: 14px;
}

.prediction-table th {
    font-size: 15px;
    font-weight: 600;
}

.prediction-table td {
    font-size: 13px;
    padding: 14px 12px;
}

/* 游戏面板 */
.game-panel {
    margin: 30px 0;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.game-links {
    text-align: center;
    line-height: 2;
}

.game-links a {
    margin: 0 8px;
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

.game-links a:hover {
    color: #764ba2;
    text-decoration: underline;
}

/* 规则面板 */
.rules-panel {
    margin: 30px 0;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.rules-panel h3 {
    color: #667eea;
    margin-top: 20px;
    margin-bottom: 10px;
}

.rules-panel ul {
    padding-left: 20px;
}

.rules-panel li {
    margin-bottom: 8px;
    line-height: 1.6;
}

/* 页脚样式 */
footer {
    margin-top: 60px;
    padding: 30px 0;
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    color: white;
    border-top: none;
}

footer p {
    margin: 8px 0;
    text-align: center;
    font-size: 13px;
    color: #bdc3c7;
}

footer a {
    color: #3498db;
    text-decoration: none;
    transition: color 0.3s ease;
}

footer a:hover {
    color: #1abc9c;
    text-decoration: underline;
}

/* 屏幕阅读器专用 */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* 移动端优化 */
@media (max-width: 768px) {
    body {
        font-size: 16px;
        -webkit-text-size-adjust: 100%;
    }
    
    /* 头部响应式优化 */
    .site-header {
        padding: 20px 0;
        margin-bottom: 20px;
    }
    
    .site-title {
        font-size: 24px;
        margin: 0 0 10px 0;
        line-height: 1.2;
        padding: 0 15px;
    }
    
    .site-description {
        font-size: 14px;
        padding: 0 15px;
        line-height: 1.4;
    }
    
    .table {
        font-size: 14px;
    }
    
    .nav-primary {
        flex-direction: column;
    }
    
    .nav-primary li {
        width: 100% !important;
        min-width: auto !important;
    }
    
    .nav-primary a {
        padding: 16px 12px !important;
        min-height: 48px !important;
        font-size: 16px;
    }
    
    /* 表格响应式容器手机端优化 */
    .table-responsive {
        margin: 0 -15px;
        padding: 15px;
        background: white;
        border-radius: 8px;
        box-shadow: 0 2px 10px rgba(0,0,0,0.1);
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .table-responsive table {
        min-width: 600px;
        width: 100%;
        font-size: 13px;
    }
    
    .table-responsive th {
        padding: 12px 8px !important;
        font-size: 13px !important;
        white-space: nowrap;
    }
    
    .table-responsive td {
        padding: 10px 8px !important;
        font-size: 12px !important;
        white-space: nowrap;
    }
    
    /* 预测结果标签手机端优化 */
    .table-responsive .label {
        padding: 3px 6px !important;
        font-size: 11px !important;
        min-width: 35px !important;
        margin: 1px;
    }
    
    .panel {
        margin: 15px 0;
    }
    
    ._head span {
        font-size: 24px;
        padding-top: 15px;
        padding-bottom: 8px;
    }
    
    /* 移动端导航优化 */
    .main-nav .nav-primary {
        flex-direction: row;
        flex-wrap: wrap;
    }
    
    .main-nav .nav-primary li {
        width: 50% !important;
    }
    
    /* 预测类型导航手机端优化 */
    .prediction-types-nav {
        padding: 10px 0;
        margin-bottom: 15px;
    }
    
    .prediction-types {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 2px;
    }
    
    .prediction-types li {
        width: 33.333% !important;
        min-width: auto !important;
        max-width: none !important;
    }
    
    .prediction-types a {
        padding: 10px 5px !important;
        min-height: 40px !important;
        font-size: 12px !important;
        line-height: 1.2;
    }
    
    /* 算法导航手机端优化 */
    .algorithm-selection-nav {
        padding: 10px 0;
        margin-bottom: 15px;
    }
    
    .algorithm-nav {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 3px;
    }
    
    .algorithm-nav li {
        width: 50% !important;
        min-width: auto !important;
        max-width: none !important;
    }
    
    .algorithm-nav a {
        padding: 10px 8px !important;
        min-height: 40px !important;
        font-size: 12px !important;
        line-height: 1.2;
    }
}

@media (max-width: 480px) {
    /* 超小屏幕头部优化 */
    .site-header {
        padding: 15px 0;
        margin-bottom: 15px;
    }
    
    .site-title {
        font-size: 20px;
        margin: 0 0 8px 0;
        line-height: 1.1;
        padding: 0 10px;
    }
    
    .site-description {
        font-size: 13px;
        padding: 0 10px;
        line-height: 1.3;
    }
    
    .nav-primary a {
        padding: 14px 10px !important;
        min-height: 44px !important;
        font-size: 15px;
    }
    
    .table {
        font-size: 13px;
    }
    
    ._head span {
        font-size: 20px;
    }
    
    h2 {
        font-size: 16px !important;
        margin: 15px 0 !important;
    }
    
    /* 超小屏幕表格响应式优化 */
    .table-responsive {
        margin: 0 -10px;
        padding: 10px;
        border-radius: 6px;
    }
    
    .table-responsive table {
        min-width: 550px;
        font-size: 12px;
    }
    
    .table-responsive th {
        padding: 10px 6px !important;
        font-size: 12px !important;
    }
    
    .table-responsive td {
        padding: 8px 6px !important;
        font-size: 15px !important;
    }
    
    /* 预测结果标签超小屏幕优化 */
    .table-responsive .label {
        padding: 2px 4px !important;
        font-size: 10px !important;
        min-width: 30px !important;
        margin: 1px;
    }
    
    /* 超小屏幕导航优化 */
    .main-nav .nav-primary li {
        width: 100% !important;
    }
    
    .nav-primary li {
        width: 50% !important;
        min-width: 100px !important;
    }
    
    /* 超小屏幕预测类型导航优化 */
    .prediction-types li {
        width: 50% !important;
        min-width: auto !important;
    }
    
    .prediction-types a {
        padding: 8px 4px !important;
        min-height: 35px !important;
        font-size: 25px !important;
        line-height: 1.1;
    }
    
    /* 超小屏幕算法导航优化 */
    .algorithm-nav li {
        width: 100% !important;
        min-width: auto !important;
    }
    
    .algorithm-nav a {
        padding: 8px 6px !important;
        min-height: 35px !important;
        font-size: 18px !important;
        line-height: 1.1;
    }
    
    .panel {
        margin: 10px 0;
    }
    
    .panel-body {
        padding: 10px;
    }
    
    .panel-body a {
        display: block;
        margin: 5px 0;
        padding: 5px;
        border: 1px solid #e5e5e5;
        border-radius: 3px;
    }
}

/* 打印样式 */
@media print {
    .nav-primary,
    .main-nav {
        display: none;
    }
    
    .table-responsive {
        overflow: visible;
    }
    
    .table-responsive table {
        min-width: auto;
    }
    
    footer {
        display: none;
    }
}

/* PC端大屏幕优化 */
@media (min-width: 1200px) {
    .content-container {
        max-width: 1400px;
        padding: 0 40px;
    }
    
    .nav-container {
        max-width: 1400px;
    }
    
    .nav-primary li {
        min-width: 140px;
        max-width: 220px;
    }
    
    .nav-primary a {
        padding: 18px 15px;
        font-size: 15px;
    }
    
    .table-responsive {
        padding: 30px;
    }
    
    .prediction-table th {
        font-size: 16px;
        padding: 18px 12px;
    }
    
    .prediction-table td {
        font-size: 14px;
        padding: 16px 12px;
    }
    
    .section-title {
        font-size: 28px;
    }
    
    .game-links a {
        margin: 0 12px;
        font-size: 14px;
    }
}

/* PC端中等屏幕优化 */
@media (min-width: 992px) and (max-width: 1199px) {
    .content-container {
        max-width: 1200px;
        padding: 0 30px;
    }
    
    .nav-primary li {
        min-width: 130px;
        max-width: 200px;
    }
    
    .nav-primary a {
        padding: 16px 12px;
    }
    
    .table-responsive {
        padding: 25px;
    }
}

/* 动画效果增强 */
.nav-primary a {
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.table-hover tbody tr {
    transition: all 0.3s ease;
}

.table-hover tbody tr:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* 滚动条美化 */
.table-responsive::-webkit-scrollbar {
    height: 8px;
}

.table-responsive::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.table-responsive::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 4px;
}

.table-responsive::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #5a6fd8 0%, #6a4190 100%);
}

/* 加载状态优化 */
.table td[data-label="开奖结果"]:contains("开奖中") {
    color: #e74c3c;
    font-weight: bold;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

/* 预测准确率样式增强 */
.label-danger[title="对"] {
    background: linear-gradient(135deg, #27ae60 0%, #2ecc71 100%);
    box-shadow: 0 2px 8px rgba(39, 174, 96, 0.3);
}

.label-primary[title="错"] {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    box-shadow: 0 2px 8px rgba(231, 76, 60, 0.3);
}

/* 响应式图片优化 */
._head img {
    max-width: 100%;
    height: auto;
}

/* 焦点状态优化 */
.nav-primary a:focus,
.game-links a:focus {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}

/* 性能优化 */
.nav-primary,
.table-responsive {
    will-change: transform;
}

/* 高对比度模式支持 */
@media (prefers-contrast: high) {
    .nav-primary a {
        border: 1px solid #333;
    }
    
    .table th {
        border: 1px solid #fff;
    }
    
    .table td {
        border: 1px solid #e9ecef;
    }
}